<template>
    <van-row>
        <van-col span="8">
            <van-sidebar v-model="active">
                <van-sidebar-item v-for="time in categoriesApidata" :title="time.cat_name" />

            </van-sidebar>
        </van-col>
        <van-col span="16">

            <div v-for="item in categoriesApidata[active]?.children">

                <van-grid :column-num="3">
                    <van-grid-item v-for="time in time.children" :icon="item.cat_icon" :text="item.cat_name" />
                </van-grid>
            </div>
        </van-col>

    </van-row>
</template>

<script setup>
import { categoriesApi } from '@/api/api'
import { ref } from 'vue';
const categoriesApidata = ref([])
categoriesApi().then((res) => {
    console.log('问问', res);
    categoriesApidata.value = res.data.message
    

})
const active=ref(0)
</script>

<style lang="scss" scoped></style>